import {getArticlest} from "@/api/home"

const state ={
    classList:[],
    txt:[],
}

const mutations ={
    //获取个推
    GET_TXT(state,payload) {
        state.txt = payload
    },
    // 获取课程
    GET_LIST(state,payload) {
        state.classList = payload
    }
}

const actions = {
    // 获取个推
    async getArticlest({commit}) {
        let res = await getArticlest()
        commit('GET_TXT',res.data)
    }
}

export default{
    state,
    mutations,
    actions
}